(ns jna.win.kernel32
  (:use jna))


(def FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100)
(def FORMAT_MESSAGE_IGNORE_INSERTS  0x00000200)
(def FORMAT_MESSAGE_FROM_STRING     0x00000400)
(def FORMAT_MESSAGE_FROM_HMODULE    0x00000800)
(def FORMAT_MESSAGE_FROM_SYSTEM     0x00001000)
(def FORMAT_MESSAGE_ARGUMENT_ARRAY  0x00002000)
(def FORMAT_MESSAGE_MAX_WIDTH_MASK  0x000000FF)

(defjna Integer kernel32 GetLastError)
(defjna Integer kernel32 FormatMessageW)

(defjna com.sun.jna.Pointer kernel32 OpenProcess)
(defjna Boolean kernel32 CloseHandle)


(defjna Integer kernel32 GetCurrentThreadId)

(defjna Integer kernel32 MulDiv)

;(defjna Boolean kernel32 K32QueryWorkingSet)

(defn get-last-error-message []
  (let [code (GetLastError)])) ; TODO
